#ifndef CONVOLUTION_H
#define CONVOLUTION_H

#include <QImage>
#include <QDebug>

#include "Transformations.h"
#include "Matrix2D.h"

/**
  * This class represents a Convolution mask which can be applied over an image
  */

class Convolution : public Matrix2D
{

    // Factor that multiplies convolution value for a pixel X,Y before inserting it in the image
    float factor;


public:
    Convolution(const short int size);

    ~Convolution();

    QImage apply(QImage * img);

    void setFactor(float f) { factor = f;
                    /*qDebug() << "FACTOR INICIAL: " << factor;*/ }

    float getFactor() { return factor; }

    void setMask(Matrix2D &m);

};

#endif
